<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="i1" placeholder="员工姓名">
<input type="text" id="i2" placeholder="工资">
<input type="text" id="i3" placeholder="工作">
<input type="button" value="添加" onclick="f()">
<table border="1">
  <caption>员工列表</caption>
  <tr>
    <th>x姓名</th>
    <th>x工资</th>
    <th>x工作</th>
  </tr>
</table>

<script>
    function f() {
        let tr = document.createElement("tr");
        let nameTd = document.createElement("td");
        let salaryTd = document.createElement("td");
        let jobTd = document.createElement("td");

        nameTd.innerText = i1.value();
        salaryTd.innerText = i2.value();
        jobTd.innerText = i3.value();

        tr.append(nameTd,salaryTd,jobTd0);

        let table = document.querySelector("table");
        table.append(tr);
    }
</script>
</body>
</html>